# -*- coding:utf-8 -*-
from . import db


class Company(db.Model):
    """
    Company ORM实体类
    """
    __tablename__ = "company"

    key_no = db.Column(db.String(36), primary_key=True)
    name = db.Column(db.String(128), nullable=False)
    credit_code = db.Column(db.String(20))
    oper_name = db.Column(db.String(64))
    start_date = db.Column(db.DateTime)
    status = db.Column(db.String(10))
    no = db.Column(db.String(20))
    phone_number = db.Column(db.String(64))
    address = db.Column(db.String(128))
    create_time = db.Column(db.DateTime, nullable=False)
    creator = db.Column(db.String(128))
    creator_id = db.Column(db.String(36))

    def __repr__(self):
        return "MapData: { id: %s , name: %s }" % (self.id, self.name)
